Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@casual-simulation/aux-common
Advanced tools
A library that contains common operations needed to modify and understand AUX files.
$ npm install @casual-simulation/aux-common
import {
createBot,
createCalculationContext,
calculateFormulaValue,
} from '@casual-simulation/aux-common';
const file1 = createBot('test1', {
quantity: 10,
});
const file2 = createBot('test2', {
quantity: 5,
});
const file3 = createBot('test3', {
quantity: 5,
});
const context = createCalculationContext([file1, file2, file3]);
const formula = '=math.sum(getBotTagValues("#quantity"))';
const result = calculateFormulaValue(context, formula);
console.log(result);
// Outputs:
// 20
import {
createBot,
createCalculationContext,
calculateFormulaEvents,
} from '@casual-simulation/aux-common';
const state = {
test1: createBot('test1', {
quantity: 10,
}),
test2: createBot('test2', {
quantity: 5,
}),
test3: createBot('test3', {
quantity: 5,
}),
};
const formula = `
let total = math.sum(getBotTagValues("#quantity"));
player.toast("The total is " + total);
`;
const events = calculateFormulaEvents(state, formula);
for (let event of events) {
if (event.type === 'local') {
if (event.name === 'show_toast') {
console.log('[Toast]', event.message);
}
}
}
// Outputs:
// [Toast] The total is 5
V0.11.27
auxBuilder
dimension and can be woken up by clicking it... [name]
- Wakes Builder with the given name. If the name is omitted, then the b001
Builder will be woken..sleep
- Puts Builder to sleep..sheet [dimension]
- Opens the sheet to the given dimension. If the dimension is omitted, then the sheet will be opened for the current dimension..new bot
- Creates a new bot in the current dimension..download
- Downloads the entire universe..upload
- Shows the upload dialog..goto {dimension}
- Redirects the page portal to the given dimension..new universe {universeName}
- Creates a new universe with the given name and opens it in a new tab..show history
- Loads the history and goes to the auxHistory
dimension..mark history
- Creates a new history mark for the current state..show docs
- Opens the documentation website in a new tab..summon
- Summons the Builder helper into the current dimension..new builder {name}
- Creates a clone of the current builder with the given name..summon
command.~
key to show the char bar.3342
finger tap code on mobile to show the chat bar.5
finger tap on mobile to hide the chat bar.FAQs
Common library for AUX projects
The npm package @casual-simulation/aux-common receives a total of 33 weekly downloads. As such, @casual-simulation/aux-common popularity was classified as not popular.
We found that @casual-simulation/aux-common demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.